<?='<?xml version="1.0" encoding="UTF-8" ?>'; ?>
<?=$this->doctype()?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script>
var globalBaseUrl = '<?=$this->baseUrl?>';
var globalDefaultAction = '<?=Zend_Registry::get('config')->user->preferences->default_action?>';
var globalLogoutTimer = null;
var globalForceLogout = false;
var globalTimerTimeout = '<?=Zend_Registry::get('sessionTimeout')?>';
</script>
<?=$this->headTitle() ?>
<?if ($this->authenticated):?>
<?=$this->headLink() ?>
<?=$this->headScript() ?>
<?else:?>
<link rel="stylesheet" type="text/css" href="<?=$this->baseUrl?>/css/global.css">
<link rel="stylesheet" type="text/css" href="<?=$this->baseUrl?>/css/style.css">
<link rel="stylesheet" type="text/css" href="<?=$this->baseUrl?>/css/dhtmlxwindows.css">
<link rel="stylesheet" type="text/css" href="<?=$this->baseUrl?>/css/dhtmlxwindows_clear_silver.css">
<script type="text/javascript" src="<?=$this->baseUrl?>/js/dhtmlxcommon.js"></script>
<script type="text/javascript" src="<?=$this->baseUrl?>/js/dhtmlxwindows.js"></script>
<?endif;?>
</head>
<body class="tundra">

<script>
var dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("<?=$this->baseUrl?>/img/");
dhxWins.pathPrefix = '';
dhxWins.setSkin('clear_silver');

if (window.mainControllerClass) {
	mainController = new mainControllerClass();
}
if (window.mainFileLoaderClass) {
	mainFileLoader = new mainFileLoaderClass();
}
if (window.barcodeControllerClass) {
	barcodeController = new barcodeControllerClass();
	window.onkeypress = function (e) { barcodeController.pressed(e); }
}
if (window.tabStateClass) {
	tabStateObject = new tabStateClass();
}
if (window.visitSelectorClass) {
	visitSelector = new visitSelectorClass();
}
if (window.teamSelectorClass) {
	teamSelector = new teamSelectorClass();
}
</script>

<div id="mainContentLayout">
<?if ($this->authenticated):?>
	<script>
	function onLoadedComplete() {
	}
	mainFileLoader.onLoadComplete = 'onLoadedComplete';
	mainFileLoader.render('mainContentLayout');
	</script>
<?endif;?>
<?=$this->layout()->content?>
</div>
</body>
</html>
